/*
 * Exploder
 * 
 * Tero Pyylampi (218437), Jussi Tuurinkoski (211594)
 *
 * All the textures, sounds, levels etc. external resources used in the game
 */

#include "Resources.h"
#include "cocos2d.h"
#include <string>

// every resource must be called using this function
char *getResource( char *resource ) {
	#if( CC_TARGET_PLATFORM == CC_PLATFORM_IOS ) 
		// folder hierarchy must be chopped away
		std::string tmp( resource );
		tmp = tmp.substr( tmp.find_last_of( "/" ) + 1, tmp.length() );
		char *newResource = new char[ tmp.size() + 1 ];
		strcpy( newResource, tmp.c_str() );
		return newResource;
	#else
		// android & win32 support complete file names
		return resource;
	#endif
}

// font used in the game
char *Fonts::FONT_NORMAL = "font/font_normal.fnt";

char *Textures::GAME_BACKGROUND = "background.jpg";

// splash scene textures
char *Textures::LOADING_UNIT = "splash/loadingunit.png";
char *Textures::LOADING_ICON = "splash/loading.png";

// menu related textures
char *Textures::MENU_BACKGROUND = "menu/brick_wall_normal.jpg";
char *Textures::MENU_UNIT = "menu/happyunit.png";
char *Textures::MENU_UNIT_WIN = "menu/raksamies_win.png";
char *Textures::MENU_UNIT_LOSE = "menu/raksamies_lose.png";
	
// menu buttons
char *Textures::MENU_BUTTON_CLOSE = "menu/CloseNormal.png";
char *Textures::MENU_BUTTON_CLOSE_SELECTED = "menu/CloseSelected.png";

// level buttons
char *Textures::MENU_LEVEL_BUTTON = "menu/level_button2.png";
char *Textures::MENU_LEVEL_BUTTON_SELECTED = "menu/level_button2_pressed.png";
char *Textures::MENU_LEVEL_LOCK = "menu/lock_graphic.png";

// dialog background
char *Textures::MENU_BACKGROUND_NOTEBOARD = "menu/noteboard.png";

// miscellancelous textures
char *Textures::GAME_INTERFACE_BACKGROUND = "misc/interfacebackground.png";
char *Textures::GAME_MISC_CARTOONFIRE = "misc/cartoonfire.png";
char *Textures::GAME_MISC_SPLINTER = "misc/splinter.png";
char *Textures::GAME_MISC_INVISIBLE = "misc/invisible.png";
char *Textures::GAME_MISC_DUST = "misc/dust.png";
char *Textures::GAME_MISC_SPARKLE = "misc/sparkle.png";
char *Textures::GAME_MISC_CLOUD1 = "game/misc/pilvi1.png";
char *Textures::GAME_MISC_CLOUD2 = "game/misc/pilvi2.png";
char *Textures::GAME_MISC_CLOUD3 = "game/misc/pilvi3.png";

// interface related
char *Textures::GAME_INTERFACE_EXIT = "game/interface/button_exit_a.png";
char *Textures::GAME_INTERFACE_EXIT_PRESSED = "game/interface/button_exit_b.png";
char *Textures::GAME_INTERFACE_HELP = "game/interface/button_help_a.png";
char *Textures::GAME_INTERFACE_HELP_PRESSED = "game/interface/button_help_b.png";
char *Textures::GAME_INTERFACE_ROTATE = "game/interface/button_rotate_a.png";
char *Textures::GAME_INTERFACE_ROTATE_PRESSED = "game/interface/button_rotate_b.png";
char *Textures::GAME_INTERFACE_STATE_NEUTRAL = "game/interface/button_state_neutral.png";
char *Textures::GAME_INTERFACE_STATE_MOVABLE = "game/interface/button_state_movable.png";
char *Textures::GAME_INTERFACE_STATE_IMMOVABLE = "game/interface/button_state_immovable.png";
char *Textures::GAME_INTERFACE_BUTTON_BACKGROUND = "game/interface/button_background.png";

// game ground objects
char *Textures::GAME_GROUND_GRASS = "game/ground/grass.png";
char *Textures::GAME_GROUND_CONCRETE = "game/ground/concrete.png";
char *Textures::GAME_GROUND_DIRT = "game/ground/dirt.jpg";

// game elements
char *Textures::GAME_ELEMENT_WOOD = "game/elements/element_wood.png";
char *Textures::GAME_ELEMENT_WOOD_BROKEN = "game/elements/element_wood_broken.png";
char *Textures::GAME_ELEMENT_WOOD_PART_A = "game/elements/element_wood_part_a.png";
char *Textures::GAME_ELEMENT_WOOD_PART_B = "game/elements/element_wood_part_b.png";
char *Textures::GAME_ELEMENT_STEEL = "game/elements/element_steel.png";
char *Textures::GAME_ELEMENT_STEEL_BROKEN = "game/elements/element_steel_broken.png";
char *Textures::GAME_ELEMENT_STEEL_PART_A = "game/elements/element_steel_part_a.png";
char *Textures::GAME_ELEMENT_STEEL_PART_B = "game/elements/element_steel_part_b.png";
char *Textures::GAME_ELEMENT_STEEL_BAR = "game/elements/element_steel_bar.png";
char *Textures::GAME_ELEMENT_STEEL_BAR_BROKEN = "game/elements/element_steel_bar_broken.png";
char *Textures::GAME_ELEMENT_STEEL_BAR_PART_A = "game/elements/element_steel_bar_part_a.png";
char *Textures::GAME_ELEMENT_STEEL_BAR_PART_B = "game/elements/element_steel_bar_part_b.png";
char *Textures::GAME_ELEMENT_STEEL_BAR_PART_C = "game/elements/element_steel_bar_part_c.png";

// game bombs
char *Textures::GAME_BOMB_SMALLMINE_A = "game/bombs/smallmine1.png";
char *Textures::GAME_BOMB_SMALLMINE_B = "game/bombs/smallmine2.png";
char *Textures::GAME_BOMB_MEDIUM = "game/bombs/regular_bomb2.png";

// game borders
char *Textures::GAME_BORDER_WOOD = "game/borders/border_wood.png";
char *Textures::GAME_BORDER_WOOD_BROKEN = "game/borders/border_wood_broken.png";
char *Textures::GAME_BORDER_WOOD_ICON = "game/borders/border_wood_icon.png";

extern char *Levels::LEVEL[ 11 ] = {
	"level.lua",
	"levels/level1.lua",
	"levels/level2.lua",
	"levels/level3.lua",
	"levels/level4.lua",
	"levels/level5.lua",
	"levels/level6.lua",
	"levels/level7.lua",
	"levels/level8.lua",
	"levels/level9.lua",
	"levels/level10.lua"
};
